package com.hundredapp.oa.repository;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.hundredapp.oa.dao.GenericDao;
import com.hundredapp.oa.domain.OaAction;
import com.hundredapp.oa.domain.OaSign;

@Repository
public class SignManagerImpl implements SignManager {

	@Autowired
	private GenericDao<OaAction, Integer> actionDao;
	@Autowired
	private GenericDao<OaSign, Integer> signDao;
	
	@Override
	public int add(OaSign sign) {
		return signDao.save(sign);
	}

	@Override
	public List<OaSign> findAllSign(String condition, int start, int limit) {
		return signDao.find(condition, start, limit);
	}
	
	@Override
	public OaSign findSign(String condition) {
		return signDao.findUnique(condition);
	}

	@Override
	public OaSign findSignById(int id) {
		return signDao.findById(id);
	}

	@Override
	public void delete(int id) {
	}

	@Override
	public void update(OaSign sign) {
		signDao.modify(sign);
	}

	@Override
	public int count(String condition) {
		return signDao.count(condition);
	}

}
